﻿//
// Created: 2018/8/14
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.Admin;

namespace Model.Admin.Map
{
    internal  class AdminUserMap:EntityTypeConfiguration< AdminUser >    
    {
        public AdminUserMap()
        {
             this.ToTable("Admin_User");
             this.HasKey(i => new { i.ID });
             this.Property(i => i.ID).HasColumnName("ID");                     
             this.Property(i => i.UserID).HasColumnName("UserID");                     
             this.Property(i => i.UserCode).HasColumnName("UserCode");                     
             this.Property(i => i.UserName).HasColumnName("UserName");                     
             this.Property(i => i.Password).HasColumnName("Password");                     
             this.Property(i => i.Mobile).HasColumnName("Mobile");                     
             this.Property(i => i.Email).HasColumnName("Email");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.Creator).HasColumnName("Creator");                     
             this.Property(i => i.UpdateTime).HasColumnName("UpdateTime");                     
             this.Property(i => i.Updator).HasColumnName("Updator");                     
             this.Property(i => i.Enable).HasColumnName("Enable");                     
        }   
    }
    
     public static class AdminUserMapExtensions
    {
        public static void UserAdminUserMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new AdminUserMap());
        }
    }
}